<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input :type="word ? 'text' : 'password'" v-model="password" />
        <button @click="dian">{{ word ? '√' : '×' }}</button>
    </div>
</body>
<script src="./vue.js"></script>
<script>
    const { createApp, ref } = Vue
    createApp({
    setup() {
        const password = ref('')
        const word = ref(false)

        function dian() {
        word.value = !word.value
        }

        return {
        password,
        word,
        dian
        }
    }
    }).mount('#app')

</script>
</html>